const fetch = require('nb-fetch/fetch')

fetch.request.use((req, next) => {
  console.log(req)
  next()
})
fetch.response.use((res, next) => {
  // console.log(res)
  next()
})
fetch.post('http://localhost:3002/label', {
  body: {
    msg: '你好'
  },
  params: {
    key: '测试'
  }
}).then(res => {
  console.log(res)
})

console.log(fetch.URLParams.url('http://localhost:3002/label', {msg: '你好'}, true))
